package br.ufmg.dcc.simulesspl.states;

import br.ufmg.dcc.simulesspl.fsm.AbstractState;
import br.ufmg.dcc.simulesspl.view.ProjectSelectionView;

public class ProjectSelectionState extends AbstractState {
	
	public void run() {
		ProjectSelectionView view = new ProjectSelectionView();
		
		view.showProjects();
		
		while(true) {
			try {
				view.chooseProject();
				break;
			} catch(Exception e) {
				view.showInvalidProjectMessage();
				view.showProjects();
			}
		}
			
		view.showSelected();
	}
}
